import http from '@/api/utils/http'

// 我上过的课程
export function myAttendCourse(params = {}) {
	return http.post('/foregin/myAttendceatt', params)
}

// 学生课程列表
export function courseList(params = null) {
	return http.post('/foregin/attendceatt', params, {
		'Content-type': 'application/x-www-form-urlencoded',
	})
}

// 今日课程列表
export function todayCourseList(params = null) {
	return http.post('/foregin/todayAttendce', params, {
		'Content-type': 'application/x-www-form-urlencoded',
	})
}

// 全部课程列表
export function allCourseList(params = null) {
	return http.post('/foregin/myCourse', params, {
		'Content-type': 'application/x-www-form-urlencoded',
	})
}

// 考勤统计数据
export function personalStat(params) {
	return http.get('/foregin/personalStat?courseId=' + params, {
		'Content-type': 'application/x-www-form-urlencoded',
	})
}
// 考勤统计数据
export function nodeList(params) {
	return http.get('/foregin/nodeList', params, {
		'Content-type': 'application/x-www-form-urlencoded',
	})
}
// 修改密码
export function updatePassword(params) {
	return http.get('/foregin/updatePass', params, {
		'Content-type': 'application/x-www-form-urlencoded',
	})
}
// 获取请假列表
export function getHoliday(params) {
	return http.post('/foregin/getHoliday', params, {
		'Content-type': 'application/x-www-form-urlencoded',
	})
}
// 请假撤回
export function deleteHoliday(params) {
	return http.get('/foregin/deleteHoliday', params, {
		'Content-type': 'application/x-www-form-urlencoded',
	})
}

// 获取新增请假页面数据
export function addHolidayBegin(params = null) {
	return http.get('/foregin/addHolidayBegin', params, {
		'Content-type': 'application/x-www-form-urlencoded',
	})
}
// 获取课程对应课时
export function getCourseByCourseIdAPI(params = null) {
	return http.get('/foregin/getCourseByCourseId', params, {
		'Content-type': 'application/x-www-form-urlencoded',
	})
}
// 新增或修改
export function addHoliday(params = null) {
	return http.post('/foregin/addHoliday', params, {
		'Content-type': 'application/x-www-form-urlencoded',
	})
}
// 异常申请提交
export function addHolidayException(params = null) {
	return http.post('/foregin/addHolidayExp', params, {
		'Content-type': 'application/x-www-form-urlencoded',
	})
}
// 异常申请列表
export function exceptionRequestList(params = null) {
	return http.post('/foregin/exceptionList', params, {
		'Content-type': 'application/x-www-form-urlencoded',
	})
}
// 打卡
export function signIn(params = {}) {
	return http.post('/foregin/signin', params)
}
